#pragma once

#include "QEvent"

template <typename DataType, int EventType>
class AGVModuleAbstractEvent : public QEvent {
  public:
  using data_t = DataType;
  constexpr static const QEvent::Type type{
      static_cast<QEvent::Type>(EventType)};

  public:
  AGVModuleAbstractEvent(const data_t &data) : QEvent(type), data_(data) {}
  virtual ~AGVModuleAbstractEvent() = default;

  const auto &data() const { return data_; }

  protected:
  data_t data_;
};